package model;
import static org.junit.Assert.*;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;


public class RabbitTest extends Rabbit
{
       
	// The rabbit's age.
    private int age;
    // Values
    private static Values value = new Values();
    //Field
    private static Field testField = new Field(50,50);
    //Location
    private static Location testLocation = new Location(40,40);
	
		/**
        * Creates an new RabbitTest with superclass Rabbit,
        */
       public RabbitTest()
       {
               super(false, testField, testLocation, value);
       }

       /**
        * testIncrementAge()
        * Made for testing the IncrementAge() in class Rabbit.
        * Will create a new Rabbit with a age of 0, testField and a testLocation.
        * Test will be report succes if the rabbit dies after 'max age+1' times using IncrementAge()
        */
       @Test
       public void testIncrementAge()
       {

           Rabbit testRabbit = new Rabbit(false, testField, testLocation, value);
           int i = 0;
           while(i<value.RABBIT_MAX_AGE+1)
               {
                       testRabbit.incrementAge();
                       i++;
               }
           assertEquals("Rabbit is alive", false, testRabbit.isAlive());
       }
       
       
}